package com.ny.demo524;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class SqlConnection {
    private static final String URL = "jdbc:mysql://localhost:3306/usersDb";
    private static final String USERNAME = "root";
    private static final String PASSWORD = "123456";
    public  static Connection getCon() throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.cj.jdbc.Driver");
    return DriverManager.getConnection(URL,USERNAME,PASSWORD);
    }
}
